]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/network: Work around xgettext ignoring translated strings
authorHeiko Hösch <heiko.hoesch@gmail.com>
Wed, 21 Dec 2022 08:13:31 +0000 (08:13 +0000)
committerMarge Bot <marge-bot@gnome.org>
Tue, 24 Jan 2023 18:20:35 +0000 (18:20 +0000)
xgettext quits parsing, when the "<"-operator follows the "++"-operator
directly.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5820
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2613>

js/ui/status/network.js

index 6d21e2d59a17b7e87208f130677edf760ca3fd22..571231d7ab200eb1def920718903af5e5d9a4a6a 100644 (file)
@@ -1223,7 +1223,9 @@ const NMWirelessDeviceItem = GObject.registerClass({
             const {network: net} = item;
             item.visible =
                 (hasWindows || net.hasConnections() || net.canAutoconnect()) &&
-                nVisible++ < MAX_VISIBLE_NETWORKS;
+                nVisible < MAX_VISIBLE_NETWORKS;
+            if (item.visible)
+                nVisible++;
         }
     }